package br.ufrgs.dbproject.algorithm.dewey;

import java.util.Stack;

public class DeweyIDUtils {

	private DeweyIDUtils() {}
	
	public static String createRawID(Stack<Integer> globalIDStack) {
		
		if (globalIDStack == null || globalIDStack.isEmpty()) {
			return "";
		}
		
		StringBuilder idBuilder = new StringBuilder();
		for (Integer localID : globalIDStack) {
			idBuilder.append(localID).append(".");
		}
		idBuilder.deleteCharAt(idBuilder.length() - 1);
		return idBuilder.toString();
	}
}
